import request from '@/config/request'

export function getDetail(params) {
    return request({
        url: '/good/getGoodById',
        method: 'post',
        params: params
    })
}

export function search(params) {
    return request({
        url: '/good/search',
        method: 'post',
        params: params
    })
}

export function getGoodById(params) {
    return request({
        url: '/good/getGoodById',
        method: 'post',
        params: params
    })
}

export function addGood(data) {
    return request({
        url: '/good/createGood',
        method: 'post',
        data: data
    })
}

export function EditGood(data) {
    return request({
        url: '/good/updateGood',
        method: 'post',
        data: data
    })
}

export function getGoods() {
    return request({
        url: '/good/getSelfGoodList',
        method: 'post'
    })
}

export function DeleteGood(params) {
    return request({
        url: '/good/deleteGoodById',
        method: 'post',
        params: params
    })
}